package com.ejoysoft.wlanyz.business;

import com.ejoysoft.auth.MD5;
import com.ejoysoft.common.*;
import com.ejoysoft.common.exception.UserUnitIdException;
import com.ejoysoft.wlanyz.system.Unit;
import com.ejoysoft.wlanyz.system.User;
import com.sun.crypto.provider.RSACipher;
import com.sun.org.apache.regexp.internal.recompile;
import com.sun.org.apache.xpath.internal.axes.OneStepIterator;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;

import java.util.ArrayList;
import java.util.Vector;
import java.util.HashMap;
import java.util.Date;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.SQLException;
import java.math.BigDecimal;

public class Disturb {
	private Globa globa;
    private DbConnect db;


    public Disturb() {
    }

    public Disturb(Globa globa) {
        this.globa = globa;
        db = globa.db;
    }

    public Disturb(Globa globa, boolean b) {
        this.globa = globa;
        db = globa.db;
        if (b) globa.setDynamicProperty(this);
    }

    String strTableName = "AC_CLASS_ASSOCIATE";
    String strTableName2 = "RM_DEVICE";
    String strTableName3 = "NHM_CHANNEL_CHANGE";


    //调出所有热点的城市名称
    public ArrayList<Object[]> getAllCitiesByName( String where )
    {
    	ArrayList<Object[]>  beans = new ArrayList<Object[]>();
    	String sql = "select distinct(strCity) from "+strTableName+" ";
    	if(where!=null && where.length()>0)
    		sql = sql +" "+where;
    	ResultSet re = db.executeQuery(sql);
    	try {
			if(re != null && re.next())
			{
				do{
					Object[] theBean = new Object[2];
					String city = re.getString("strCity");
					theBean[0] = city;
					theBean[1] = this.getAllCountryByName(city);
					beans.add(theBean);
				}while(re.next());
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	return beans;
    }
    //调出城市所有区县名称
    public ArrayList<String> getAllCountryByName( String city)
    {
    	ArrayList<String>  beans = new ArrayList<String>();
    	String sql = "select distinct(strCountry) from "+strTableName+" ";
    	String where = " where strCity='"+city+"'";
    	sql = sql+where;
    	ResultSet re = db.executeQuery(sql);
    	try {
    	
			if(re != null && re.next())
			{   //String country = re.getString("");
				do{
					String country = re.getString("strCountry");
					beans.add(country);
				}while(re.next());
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	return beans;
    }
    //调出城市区县所有一级热点名称
    public ArrayList<String> getAllclassOneAcByName( String city,String country)
    {
    	ArrayList<String>  beans = new ArrayList<String>();
    	String sql = "select distinct(classoneac) from "+strTableName+" ";
    	String where = " where strCity='"+city+"' and strcountry = '"+country+"'";
    	sql = sql+where;
    	ResultSet re = db.executeQuery(sql);
    	try { 
			if(re != null && re.next())
			{   //String strcountry = re.getString("");
				do{
					String strcountry = re.getString("classoneac");
					beans.add(strcountry);
				}while(re.next());
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	return beans;
    }
  //查询符合条件的记录总数
    public int getCount(String tWhere) {
        int count = 0;
        try {
            String sql = "SELECT count(DISTINCT CLASSONEAC) FROM  " + strTableName + " a  " ;
            if(tWhere.length()>0)
            	sql = String.valueOf(sql) + String.valueOf(tWhere);
            ResultSet rs = db.executeQuery(sql);
            if (rs.next())
                count = rs.getInt(1);
            rs.close();
            return count;
        } catch (Exception ee) {
            ee.printStackTrace();
            System.out.println(ee);          
            return count;
        }
    }



    //记录集转化为对象
    public Disturb load(ResultSet rs, String strStartTime, String strEndTime) {
    	DbConnect dbConnect = new DbConnect();
        Disturb theBean = new Disturb();   
        if(strStartTime.equals(""))strStartTime = "01-1-1000";
        if(strEndTime.equals(""))strEndTime = "30-12-9999";
        
        String timeWhere = " and t1.timestamp between to_date('" + strStartTime + "','dd-MM-yy hh24.mi.ss') and to_date('" + strEndTime + "','dd-MM-yy hh24.mi.ss')" ; 
        try {
            theBean.setCity(rs.getString(1));
            theBean.setCounty(rs.getString(2));
            theBean.setHotSpot(rs.getString(3));
            theBean.sethotSpotNum(rs.getInt(4));
            theBean.setApNum(rs.getInt(5));
            theBean.setAcType(rs.getString(6));
            	 String sql1 = "select b.device_id from " + strTableName + " a , " + strTableName2 + " b where strcity LIKE '%"+theBean.getCity()+"%' and strcountry like '%"+theBean.getCounty()+"%' and classoneac like '%"+theBean.getHotSpot()+"%' and  STRTYPE like '%"+theBean.getAcType()+"%' and  classtwoac =  hotspot and " +
            	 " a.classoneac ='" + theBean.getHotSpot()  + "'";
            	 String sql = "select avg(quality) from " + strTableName3 + " t1,(" + sql1 + ")t2 where t1.device_id = t2.device_id ";
            	 sql += timeWhere;
                 ResultSet rs1 = dbConnect.executeQuery(sql);
                 if(rs1.next())
                 { 
                	 double quality = rs1.getDouble(1);
                	 BigDecimal b = new BigDecimal(quality);
                	 quality = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();//保留两位小数
                	 theBean.setApQuality(quality);
                 }
                 rs1.close();
                 
                 String sql2 = "select count(*) from(" + sql + "group by t1.device_id having avg(quality)>10)";
                 ResultSet rs2 = dbConnect.executeQuery(sql2);
                 if(rs2.next())
                 { 
                	 theBean.setApDisturbNum(rs2.getInt(1));
                 }
                 rs2.close();
        } catch (Exception e) {
            e.printStackTrace();      
        }
        dbConnect.closeCon();
        return theBean;
    }

  //列表记录集
    public Vector list(String where, int startRow, int rowCount, String strStartTime, String strEndTime) {
        Vector beans = new Vector();
        try {
           String sql = "SELECT a.STRCITY,a.STRCOUNTRY,a.CLASSONEAC,count(distinct classtwoac),count(B.DEVICE_ID),a.STRTYPE FROM  " + 
           				 strTableName + " a LEFT JOIN "  + strTableName2 + " b ON a.CLASSTWOAC=b.HOTSPOT ";
        
            if (where.length() > 0)
                sql = String.valueOf(sql) + String.valueOf(where);
            sql += " group by a.STRCITY,a.STRCOUNTRY,a.CLASSONEAC,a.STRTYPE ";
            sql += " order by a.STRCITY,a.STRCOUNTRY,a.CLASSONEAC";
            Statement s = db.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
            if (startRow != 0 && rowCount != 0)
                s.setMaxRows((startRow + rowCount) - 1);     
            ResultSet rs = s.executeQuery(sql);
            if (rs != null && rs.next()) {
                if (startRow != 0 && rowCount != 0)
                    rs.absolute(startRow);
                do {
                    Disturb theBean = new Disturb();
                    theBean = load(rs, strStartTime, strEndTime);
                    beans.addElement(theBean);
                } while (rs.next());
            }
            rs.close();
            s.close();
            
            
        } catch (Exception ee) {
            ee.printStackTrace();
        }
        return beans;
    }
  //查询符合条件的记录总数
    public int getCount1(String tWhere) {
        int count = 0;
        try {
            String sql = "SELECT count(DISTINCT STRCITY) FROM  " + strTableName + " a  " ;
            if(tWhere.length()>0)
            	sql = String.valueOf(sql) + String.valueOf(tWhere);
            ResultSet rs = db.executeQuery(sql);
            if (rs.next())
                count = rs.getInt(1);
            rs.close();
            return count;
        } catch (Exception ee) {
            ee.printStackTrace();
            System.out.println(ee);          
            return count;
        }
    }
    //记录集转化为对象
    public Disturb load1(ResultSet rs, String strStartTime, String strEndTime) {
    	DbConnect dbConnect = new DbConnect();
        Disturb theBean = new Disturb();   
        if(strStartTime.equals(""))strStartTime = "01-1-1000";
        if(strEndTime.equals(""))strEndTime = "30-12-9999";
        
        String timeWhere = " and t1.timestamp between to_date('" + strStartTime + "','dd-MM-yy hh24.mi.ss') and to_date('" + strEndTime + "','dd-MM-yy hh24.mi.ss')" ; 
        try {
            theBean.setCity(rs.getString(1));
            theBean.setcountryNum(rs.getInt(2));
            theBean.sethotSpotNum(rs.getInt(3));
            theBean.setApNum(rs.getInt(4));
            	 String sql1 = "select b.device_id from " + strTableName + " a , " + strTableName2 + " b where a.classtwoac = b.hotspot and " +
            	 " a.strcity ='" + theBean.getCity()  + "'";
            	 String sql = "select avg(quality) from " + strTableName3 + " t1,(" + sql1 + ")t2 where t1.device_id = t2.device_id ";
            	 sql += timeWhere;
                 ResultSet rs1 = dbConnect.executeQuery(sql);
                 if(rs1.next())
                 { 
                	 double quality = rs1.getDouble(1);
                	 BigDecimal b = new BigDecimal(quality);
                	 quality = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();//保留两位小数
                	 theBean.setApQuality(quality);
                 }
                 rs1.close();
                 
                 String sql2 = "select count(*) from(" + sql + "group by t1.device_id having avg(quality)>10)";
                 ResultSet rs2 = dbConnect.executeQuery(sql2);
                 if(rs2.next())
                 { 
                	 theBean.setApDisturbNum(rs2.getInt(1));
                 }
                 rs2.close();
        } catch (Exception e) {
            e.printStackTrace();      
        }
        dbConnect.closeCon();
        return theBean;
    }
  //列表记录集
    public Vector list1(String where, int startRow, int rowCount, String strStartTime, String strEndTime) {
        Vector beans = new Vector();
        try {
           String sql = "SELECT a.STRCITY,COUNT(DISTINCT STRCOUNTRY),COUNT(DISTINCT CLASSONEAC),count(DISTINCT DEVICE_ID)  FROM  " + 
           				 strTableName + " a LEFT JOIN "  + strTableName2 + " b ON a.CLASSTWOAC=b.HOTSPOT ";
        
            if (where.length() > 0)
                sql = String.valueOf(sql) + String.valueOf(where);
            sql += " group by a.STRCITY ";
            sql += " order by a.STRCITY ";
            Statement s = db.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
            if (startRow != 0 && rowCount != 0)
                s.setMaxRows((startRow + rowCount) - 1);     
            ResultSet rs = s.executeQuery(sql);
            if (rs != null && rs.next()) {
                if (startRow != 0 && rowCount != 0)
                    rs.absolute(startRow);
                do {
                    Disturb theBean = new Disturb();
                    theBean = load1(rs, strStartTime, strEndTime);
                    beans.addElement(theBean);
                } while (rs.next());
            }
            rs.close();
            s.close();
            
            
        } catch (Exception ee) {
            ee.printStackTrace();
        }
        return beans;
    }
  //查询符合条件的记录总数
    public int getCount11(String tWhere) {
        int count = 0;
        try {
            String sql = "SELECT count(DISTINCT STRCOUNTRY) FROM  " + strTableName + " a  " ;
            if(tWhere.length()>0)
            	sql = String.valueOf(sql) + String.valueOf(tWhere);
            ResultSet rs = db.executeQuery(sql);
            if (rs.next())
                count = rs.getInt(1);
            rs.close();
            return count;
        } catch (Exception ee) {
            ee.printStackTrace();
            System.out.println(ee);          
            return count;
        }
    }
  //记录集转化为对象
    public Disturb load11(ResultSet rs, String strStartTime, String strEndTime) {
    	DbConnect dbConnect = new DbConnect();
        Disturb theBean = new Disturb();   
        if(strStartTime.equals(""))strStartTime = "01-1-1000";
        if(strEndTime.equals(""))strEndTime = "30-12-9999";
        
        String timeWhere = " and t1.timestamp between to_date('" + strStartTime + "','dd-MM-yy hh24.mi.ss') and to_date('" + strEndTime + "','dd-MM-yy hh24.mi.ss')" ; 
        try {
            theBean.setCity(rs.getString(1));
            theBean.setCounty(rs.getString(2));
            theBean.sethotSpotNum(rs.getInt(3));
            theBean.setApNum(rs.getInt(4));
            	 String sql1 = "select b.device_id from " + strTableName + " a , " + strTableName2 + " b where a.classtwoac = b.hotspot and " +
            	 " a.strcity ='" + theBean.getCity()  + "' and a.strcountry = '"+theBean.getCounty()+"' ";
            	 String sql = "select avg(quality) from " + strTableName3 + " t1,(" + sql1 + ")t2 where t1.device_id = t2.device_id ";
            	 sql += timeWhere;
                 ResultSet rs1 = dbConnect.executeQuery(sql);
                 if(rs1.next())
                 { 
                	 double quality = rs1.getDouble(1);
                	 BigDecimal b = new BigDecimal(quality);
                	 quality = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();//保留两位小数
                	 theBean.setApQuality(quality);
                 }
                 rs1.close();
                 
                 String sql2 = "select count(*) from(" + sql + "group by t1.device_id having avg(quality)>10)";
                 ResultSet rs2 = dbConnect.executeQuery(sql2);
                 if(rs2.next())
                 { 
                	 theBean.setApDisturbNum(rs2.getInt(1));
                 }
                 rs2.close();
        } catch (Exception e) {
            e.printStackTrace();      
        }
        dbConnect.closeCon();
        return theBean;
    }
  //列表记录集
    public Vector list11(String where, int startRow, int rowCount, String strStartTime, String strEndTime) {
        Vector beans = new Vector();
        try {
           String sql = "SELECT a.STRCITY, STRCOUNTRY,COUNT(DISTINCT CLASSONEAC),count(DISTINCT DEVICE_ID)  FROM  " + 
           				 strTableName + " a LEFT JOIN "  + strTableName2 + " b ON a.CLASSTWOAC=b.HOTSPOT ";
        
            if (where.length() > 0)
                sql = String.valueOf(sql) + String.valueOf(where);
            sql += " group by a.STRCITY ,STRCOUNTRY ";
            sql += " order by a.STRCITY ";
            Statement s = db.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
            if (startRow != 0 && rowCount != 0)
                s.setMaxRows((startRow + rowCount) - 1);     
            ResultSet rs = s.executeQuery(sql);
            if (rs != null && rs.next()) {
                if (startRow != 0 && rowCount != 0)
                    rs.absolute(startRow);
                do {
                    Disturb theBean = new Disturb();
                    theBean = load11(rs, strStartTime, strEndTime);
                    beans.addElement(theBean);
                } while (rs.next());
            }
            rs.close();
            s.close();
            
            
        } catch (Exception ee) {
            ee.printStackTrace();
        }
        return beans;
    }

    //二级热点数据操作
    
    //调出城市所有区县名称
    public ArrayList<String> getAllclassTwoAcByName( String city,String country,String classoneac)
    {
    	ArrayList<String>  beans = new ArrayList<String>();
    	String sql = "select distinct(classtwoac) from "+strTableName+" ";
    	String where = " where strCity='"+city+"' and strcountry = '"+country+"' and classoneac = '"+classoneac+"' ";
    	sql = sql+where;
    	ResultSet re = db.executeQuery(sql);
    	try { 
			if(re != null && re.next())
			{   //String strcountry = re.getString("");
				do{
					String classtwoac = re.getString("classtwoac");
					beans.add(classtwoac);
				}while(re.next());
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	return beans;
    }
    //
  //查询符合条件的记录总数
    public int getCount2(String tWhere) {
        int count = 0;
        try {
            String sql = "SELECT count(classTwoAc) FROM  " + strTableName + " a  " ;
            if(tWhere.length()>0)
            	sql = String.valueOf(sql) + String.valueOf(tWhere);
            ResultSet rs = db.executeQuery(sql);
            if (rs.next())
                count = rs.getInt(1);
            rs.close();
            return count;
        } catch (Exception ee) {
            ee.printStackTrace();
            System.out.println(ee);          
            return count;
        }
    }

    //记录集转化为对象
    public Disturb load2(ResultSet rs, String strStartTime, String strEndTime) {
    	DbConnect dbConnect = new DbConnect();
        Disturb theBean = new Disturb();   
        if(strStartTime.equals(""))strStartTime = "01-1-1000";
        if(strEndTime.equals(""))strEndTime = "30-12-9999";
        
        String timeWhere = " and t1.timestamp between to_date('" + strStartTime + "','dd-MM-yy hh24.mi.ss') and to_date('" + strEndTime + "','dd-MM-yy hh24.mi.ss')" ; 
        try {
        	theBean.setstrId(rs.getString(1));
            theBean.setCity(rs.getString(2));
            theBean.setCounty(rs.getString(3));
            theBean.setHotSpot(rs.getString(4));
            theBean.setApNum(rs.getInt(5));
            theBean.setAcType(rs.getString(6));
            	 String sql1 = "select device_id from " + strTableName2 + " where hotspot ='" + theBean.getHotSpot()  + "'";
            	 String sql = "select avg(quality) from " + strTableName3 + " t1,(" + sql1 + ")t2 where t1.device_id = t2.device_id ";
            	 sql += timeWhere;
                 ResultSet rs1 = dbConnect.executeQuery(sql);
                 if(rs1.next())
                 { 
                	 double quality = rs1.getDouble(1);
                	 BigDecimal b = new BigDecimal(quality);
                	 quality = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();//保留两位小数
                	 theBean.setApQuality(quality);
                 }
                 rs1.close();
                 
                 String sql2 = "select count(*) from(" + sql + "group by t1.device_id having avg(quality)>10)";
                 ResultSet rs2 = dbConnect.executeQuery(sql2);
                 if(rs2.next())
                 { 
                	 theBean.setApDisturbNum(rs2.getInt(1));
                 }
                 rs2.close();
        } catch (Exception e) {
            e.printStackTrace();      
        }
        dbConnect.closeCon();
        return theBean;
    }

  //列表记录集
    public Vector list2(String where, int startRow, int rowCount, String strStartTime, String strEndTime) {
        Vector beans = new Vector();
        try {
           String sql = "SELECT strid,a.STRCITY,a.STRCOUNTRY,a.CLASSTWOAC,count(B.DEVICE_ID),a.STRTYPE FROM  " + 
           				 strTableName + " a LEFT JOIN "  + strTableName2 + " b ON a.CLASSTWOAC=b.HOTSPOT ";
        
            if (where.length() > 0)
                sql = String.valueOf(sql) + String.valueOf(where);
            sql += " group by strid,a.STRCITY,a.STRCOUNTRY,a.CLASSTWOAC,a.STRTYPE ";
            sql += " order by strid,a.STRCITY,a.STRCOUNTRY,a.CLASSTWOAC";
            Statement s = db.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
            if (startRow != 0 && rowCount != 0)
                s.setMaxRows((startRow + rowCount) - 1);     
            ResultSet rs = s.executeQuery(sql);
            if (rs != null && rs.next()) {
                if (startRow != 0 && rowCount != 0)
                    rs.absolute(startRow);
                do {
                    Disturb theBean = new Disturb();
                    theBean = load2(rs, strStartTime, strEndTime);
                    beans.addElement(theBean);
                } while (rs.next());
            }
            rs.close();
            s.close();
            
            
        } catch (Exception ee) {
            ee.printStackTrace();
        }
        return beans;
    }

    
    //ap数据操作
    //二级热点数据操作
    //查询符合条件的记录总数
      public int getCount3(String tWhere) {
          int count = 0;
          try {
              String sql = "SELECT count(classtwoac) FROM  " + strTableName + " a LEFT JOIN " + strTableName2 + " b ON a.classtwoac=b.hotspot " ;
              if(tWhere.length()>0)
              	sql = String.valueOf(sql) + String.valueOf(tWhere);
              ResultSet rs = db.executeQuery(sql);
              if (rs.next())
                  count = rs.getInt(1);
              rs.close();
              return count;
          } catch (Exception ee) {
              ee.printStackTrace();
              System.out.println(ee);          
              return count;
          }
      }

      //记录集转化为对象
      public Disturb load3(ResultSet rs, String strStartTime, String strEndTime) {
    	  DbConnect dbConnect = new DbConnect();
          Disturb theBean = new Disturb();   
          if(strStartTime.equals(""))strStartTime = "01-1-1000";
          if(strEndTime.equals(""))strEndTime = "30-12-9999";         
          String timeWhere = " and timestamp between to_date('" + strStartTime + "','dd-MM-yy hh24.mi.ss') and to_date('" + strEndTime + "','dd-MM-yy hh24.mi.ss')" ; 
          try {
        	  theBean.setstrId(rs.getString(1));
              theBean.setCity(rs.getString(2));
              theBean.setCounty(rs.getString(3));
              theBean.setHotSpot(rs.getString(4));
              if(rs.getString(5) == null)theBean.setApName("无AP");
              else  theBean.setApName(rs.getString(5));
              theBean.setApDevId(rs.getString(6));
              	 String sql = "select avg(quality) from " + strTableName3 + "  where device_id = '" + theBean.getApDevId() + "' ";
              	 sql += timeWhere;
                   ResultSet rs1 = dbConnect.executeQuery(sql);
                   if(rs1.next())
                   { 
                  	 double quality = rs1.getDouble(1);
                  	 BigDecimal b = new BigDecimal(quality);
                  	 quality = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();//保留两位小数
                  	 theBean.setApQuality(quality);
                   }
                   rs1.close();
                   
          } catch (Exception e) {
              e.printStackTrace();      
          }
          dbConnect.closeCon();
          return theBean;
      }

    //列表记录集
      public Vector list3(String where, int startRow, int rowCount, String strStartTime, String strEndTime) {
          Vector beans = new Vector();
          try {
             String sql = "SELECT strid,a.STRCITY,a.STRCOUNTRY,a.CLASSTWOAC,B.DEVICE_NAME,b.device_id FROM  " + 
             				 strTableName + " a LEFT JOIN "  + strTableName2 + " b ON a.CLASSTWOAC=b.HOTSPOT ";
          
              if (where.length() > 0)
                  sql = String.valueOf(sql) + String.valueOf(where);
              Statement s = db.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
              if (startRow != 0 && rowCount != 0)
                  s.setMaxRows((startRow + rowCount) - 1);     
              ResultSet rs = s.executeQuery(sql);
              if (rs != null && rs.next()) {
                  if (startRow != 0 && rowCount != 0)
                      rs.absolute(startRow);
                  do {
                      Disturb theBean = new Disturb();
                      theBean = load3(rs, strStartTime, strEndTime);
                      beans.addElement(theBean);
                  } while (rs.next());
              }
              rs.close();
              s.close();
             
          } catch (Exception ee) {
              ee.printStackTrace();
          }
          return beans;
      }
    private String strId;//id
    private String city;//热点城市
    private int countryNum;//区县数量
    private String county;//	热点区县
    private int hotSpotNum;//热点数量
    private String hotSpot;//	热点(一级或二级)
    private String apName; //
    private String apDevId; //
    private int apNum;//热点数量
    private String acType;//热点类型
    private int apDisturbNum;//被干扰的AP数
    private double apQuality;//信道质量
    private String dtStartTime;//开始时间
    private String dtEndTime;//结束时间

    public String getstrId() {
        return strId;
    }

    public void setstrId(String strId) {
        this.strId = strId;
    }
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
    
    public int getcountryNum()
    {
    	return countryNum;
    }
    
    public void setcountryNum(int country)
    {
    	this.countryNum = country;
    }
    
    public String getCounty() {
		return county;
	}
    
    public void setCounty(String county){
    	 this.county = county;
    }
    
    public int gethotSpotNum()
    {
    	return hotSpotNum;
    }
    
    public void sethotSpotNum(int hotSpotNum)
    {
    	this.hotSpotNum = hotSpotNum;
    }
    
    public String getHotSpot() {
		return hotSpot;
	}
    
    public void setHotSpot(String hotSpot){
    	this.hotSpot = hotSpot;
    }
    public String getApName() {
		return apName;
	}  
    public void setApName(String apName){
    	this.apName = apName;
    }
    public String getApDevId() {
		return apDevId;
	}  
    public void setApDevId(String apDevId){
    	this.apDevId = apDevId;
    }
    public int getApDisturbNum() {
		return apDisturbNum;
	}
    
    public void setApDisturbNum(int apDisturbNum){
    	this.apDisturbNum = apDisturbNum;
    }
    
    public String getAcType() {
		return acType;
	} 
    public void setAcType(String acType) {
		this.acType = acType;
	}
    public int getApNum() {
		return apNum;
	}
    
    public void setApNum(int apNum){
    	this.apNum = apNum;
    }

    public double getApQuality() {
        return apQuality;
    }

    public void setApQuality(double apQuality) {
        this.apQuality = apQuality;
    }

    public String getDtStartTime() {
        return dtStartTime;
    }
    public void setDtStartTime(String dtStartTime) {
        this.dtStartTime = dtStartTime;
    }
    public String getDtEndTime() {
        return dtEndTime;
    }
    public void setDtEndTime(String dtEndTime) {
        this.dtEndTime = dtEndTime;
    }
    

}
